-
Notifications
You must be signed in to change notification settings - Fork 165
feat!: add workflows namespace sub-package extras #346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
CI fails because |
Add optional dependencies for mistralai-workflows and its plugin extras, enabling `pip install mistralai[workflows]` and `pip install mistralai[workflows-mistralai]`. Document the PEP 420 namespace sub-package pattern in README. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2500f70 to
9a71b31
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice.
I'm blocking the merge since we need before merging:
to update the workflow package to respect the target structuremistralai/workflows- to solve those otel issues
7bd332a to
02bffb1
Compare
|
|
||
| ```bash | ||
| pip install mistralai[gcp] | ||
| uv add "mistralai[gcp]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nelson-PROIA apologies for contradictory review, but I think we should use pip in doc (😶🌫️) (like other big SDK do).
Actually I don't think we should do this in this order. The main SDK (on which the workflow SDK depends) should first be updated no? Then, the workflow SDK can be updated and published with a new major version? |
@HHK1 yes your are correct. I was incorrectly understanding how the whole the workflow SDK fitted with the rest. |
louis-sanna-dev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nelson-PROIA looks good, let's just move back to pip in doc and merge.
Summary
workflowsandworkflows-mistralaioptional dependencies topyproject.tomlChanges
pyproject.toml:This enables the install matrix from the PEP 420 integration plan:
pip install mistralaipip install mistralai[workflows]pip install mistralai[workflows-mistralai]Plugin extras use flat naming to chain dependencies (
mistralai[workflows-X]→mistralai-workflows[X]), since nested pip extras are not valid syntax.README.md: Added "Namespace Sub-packages" section documenting the pattern.TODO: Rename
mistralaipluginThe current workflows plugin is named
mistralai(mistralai-workflows[mistralai]), which means the full install path ismistralai[workflows-mistralai]. This is confusing — a plugin calledmistralaiinside themistralainamespace. It should be renamed to something descriptive (e.g.platform,api,core). Once renamed, the extra here needs to be updated accordingly. Waiting on workflows team decision.Validation
Built wheels from both repos and verified the PEP 420 namespace merge in a clean venv:
Both packages install under
site-packages/mistralai/with no__init__.pyat the namespace level — Python mergesclient/andworkflows/automatically.Known issue
mistralaipinsopentelemetry-semantic-conventions>=0.59b0,<0.60.mistralai-workflowstransitively pulls inopentelemetry-semantic-conventions==0.60b1, which violates the client's<0.60upper bound. Fix: widen the client's upper bound to<0.61. This dependency is generated by Speakeasy, so it needs to be updated in the next SDK generation or overridden manually (the file is in.genignore).